//
//  WHYHomeLabel.m
//  News163
//
//  Created by 王洪运 on 15/12/30.
//  Copyright © 2015年 王洪运. All rights reserved.
//

#import "WHYHomeLabel.h"

@implementation WHYHomeLabel

-(instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self.textAlignment = NSTextAlignmentCenter;
        self.font = [UIFont systemFontOfSize:20];
        self.userInteractionEnabled = YES;
        self.scale = 0.0;
    }
    return self;
}

-(void)setScale:(CGFloat)scale {
    
    _scale = scale;
    
//    颜色渐变
    self.textColor = [UIColor colorWithRed:scale green:0.0 blue:0.0 alpha:1.0];
    
//    大小渐变
    CGFloat minScale = 0.6;
    CGFloat whScale = minScale + scale * (1 - minScale);
    self.transform = CGAffineTransformMakeScale(whScale, whScale);
    
}

@end
